import React from 'react'
import { Descriptions, Badge } from 'antd'
import CardTitle from '../G6Record/CardTitle'
import { color, sqNingBo } from '../../utils/json'
import styles from '../G6Record/style.module.scss'

export default function NingBoIndex(props) {
  const { record = {} } = props

  return (
    <div>
      <CardTitle title={'鉴权信息'}></CardTitle>
      <Descriptions>
        <Descriptions.Item label="vin">{record.vin}</Descriptions.Item>
        <Descriptions.Item label={'鉴权状态'}>
          {
            <Badge
              status={color[record.filingStatusG5]}
              text={sqNingBo[record.filingStatusG5]}
            />
          }
        </Descriptions.Item>
      </Descriptions>
      <CardTitle title={'鉴权记录'}></CardTitle>
      <div
        className={styles.successImg}
        style={{
          display: record?.filingStatusG5 === 1 ? 'block' : 'none',
        }}
      ></div>
    </div>
  )
}
